Chris Pollett > Old Classes >
CS116b

( Print View )

Student Corner:
  [Grades Sec1]

  [Submit Sec1]

  [Email List Sec1]

  [
Lecture Notes]

Course Info:
  [Texts & Links]
  [Topics]
  [Grading]
  [HW Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]

Practice Exams:
  [Mid1]  [Mid2]  [Final]

                           












HW#4 --- last modified March 02 2019 21:15:13..

Solution set.

Due date: May 2

Files to be submitted:
  RayTrace.zip

Purpose: To experiment with ray-tracing.

Specification:

For this assignment I would like you to write a program which renders a scene using ray-tracing consisting of a checkerboard with a tetrahedron, a sphere, and a cube hovering above various squares. I want the tetrahedron to be partially transparent, the sphere to be completely reflecting, and the cube to reflect like a shiny red plastic. The checkerboard itself should have a polished appearance. Each of the pieces should hover one checkerboard square above the checkerboard square they are at and should have dimensions so that if it were directly on the board it would cover as much of the square as possible for that type of object without going ouside the boundaries for that square. The only light source in the scene hovers above yet another chess square at five chess square heights above the board. When you run your program, it should prompt the user at the command line for the location of the light source, the location of the tetrahedron, the location of the sphere and the location of the cube. To specify the location of an object the user can type in an input like a8. This would say that the given object was in the first row front to back and the eigth column left to right. An input like c2 would specify third row, second column. After the user has supplied all of this information, the program should render the scene with the user supplied data. In your documentation at the start of your program, you should indicate the kind of machine you had at home and how long the rendering process took. You should cut off the tree for each ray at some fixed depth which you should also prompt the user for.

Gabriel pointed out this interesting site for ray-tracing stuff.

Point Breakdown

Departmental coding guidelines for C++ followed 1pt
Program prompts user for above information 1pt
Program renders some scene which is approximately as describe (whether or not the ray tracing worked)2pts
Sphere is reflecting, tetrahedron transparent, and cube red 2pts
Light source where described 1pt
Ray tracing algorithm appears to be implemented correctly2pts
Control over number of bounces of ray as described1pt
Total10pts

In class presentation of your project on the due date can be worth two additional bonus points!

Making shadow rays work is worth two additional bonus points!